<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head> 
	<title>安装通-中国智慧安装采供服务平台</title>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<meta http-equiv = "X-UA-Compatible" content = "IE=edge,chrome=1" />
	<meta name="description" content="安装通（azt365.com）中国大型的b2b电子商务智慧化平台,整合了国内安装行业内采购商与供应商,打通上下游产业链,信息透明共享,通过云平台,大数据,为各大企业供应商提供产品信息、企业推广,为您提供全面的安装行业资讯金融服务以及线上支付.">
	<meta name="keywords" content="安装通,azt365,江苏b2b电子商务,江苏建筑采供批发平台,江苏弱电批发,江苏消防报警系统,江苏智慧安装建筑安装,江苏安防监控系统,江苏通风设备安装,江苏通风工程安装,江苏通风工程施工,江苏消防工程材料批发,江苏消防工程材料">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
    <link href="/res/css/common/style.css" rel="stylesheet">
	<link href="/res/css/common/css.css" rel="stylesheet">
	<link href="/res/css/common/azt.css" rel="stylesheet">
	<style type="text/css">
	button { border: none; }
	input[type="button"] { border: none; }
	input[type="text"] {font-size: 14px;}
	input[type="password"] {font-size: 14px;} 
	.inputDiv.loginForm>div{ 
		position: absolute; 
	}
	.inputDiv.loginForm h6 a{
		cursor: pointer;
	}
	.hid{
		left: -900px;
	}
	a.present{
	color: #00b1db;
	}
	</style>
  </head>
  <body class="logiinBody">
  <div style="height:90px;background:white;">
	<div class="top">
		<img src="/res/images/logoAzt/indexlogo.jpg" style="margin-top:13.5px;float:left;"/>
		<big style="margin-top: 13.5px;">注册</big>
		<small>400-848-1365</small>
		<img src="/res/images/common/a_06.jpg" class="topImgSec"/>
	 </div>
  </div>  
  <div style="width: 1200px;margin: 0 auto;">
  	<img src="/res/images/common/loginIntro.png" style="margin-top: 150px;"/>
  </div>
	<div class="loginOuter">
		<div class="inputDiv regForm" style="top:0;left:25px;">
			<h6>账号注册</h6> 
			<small style="visibility:hidden;position: relative;" id="registerError">
			    <img src="/res/images/oparaStatus/noticeCl_11.jpg" style="position: absolute;top:5px;left:10px;"/>  
				<span style="margin-left: 15px;display: inline-block;"></span>
			</small>
			<div style="padding-left: 0px;overflow: hidden;border:1px solid #cfcfcf;">
			<input placeholder="手机/邮箱" type="text" id="regsAccont" name="username" onblur="checkUserNameForRegister(true)" style="border: none;"/>
		 
			</div>
			<div style="padding-left: 0px;overflow: hidden;border:1px solid #cfcfcf;">
			<input placeholder="密码" name="password" type="password" style="border: none;"/> 
			</div>
			<div style="padding:0;">
				<input placeholder="验证码" type="text" style="width:130px;width:110px\9;float:left;margin:0;" name="code"/>
				<div class="sendValiReg" style="padding-left: 0;margin: 0;display: none; border: none;" id="smsCode">
					<button id="sended" type="button" style="background: none;color: #00ceff;position: relative; border:1px solid #00ceff;" onclick="reSend()">发送验证码</button>
                    <button id="sending" type="button" style="background: none;color: #c9cfd6;position: relative; border: 1px solid #cfcfcf;display: none;">59秒重新发送</button>
				</div>
				<div class="changePicReg" style="margin:0;padding:0;" id="picCode">
					<img src="/authImage?n=regCode" alt="" style="width:85px;height: 40px;border: none;" onclick="randomPicCode()"/>
					<button type="button" onclick="randomPicCode()">换一张</button>
				</div>  
			</div> 
			<b style="text-align:left;padding-left: 0px;font-weight: normal;">
				<em style="margin-top:-10px;padding-left: 0px;">
					<span class="checkSwitch" style="display: inline-block; width: 15px; height: 15px;">
						<img src="/res/images/checkBoxRadio/noCheck.jpg" onclick="read(this)" style="display:none;vertical-align: auto;" data-id="hasRead" data-value="false"/>
						<img src="/res/images/checkBoxRadio/a_18.jpg" onclick="read(this)" data-id="hasRead" data-value="true" style="vertical-align: auto;"/>
					</span>
                    <input type="hidden" name="hasRead" id="hasRead" value="true"/>
                    我已阅读并同意<a style="clear:both; color: #00a8e6;font-size: 14px;" href="http://www.azt365.com/cs/?k=userservice" target="_blank">《安装通注册协议》</a>
				</em>
			</b>
			<button type="button" onclick="register();">立即注册</button>
			<b style="font-weight: normal;">已有账号，<a href="javascript:void(0);" style="color:#00b1db;" onclick="switchToL(this)">点击登录</a></b>
		</div> 
		<div class="inputDiv loginForm" style="top: 0;left:-350px;">  
			<h6><a class="present" data-type="0">供应商登录</a><a data-type="1" style="float: right;">管理员登录</a></h6>
			<div> 
			<small style="visibility: hidden;" id="loginError">
				<img src="/res/images/oparaStatus/noticeCl_11.jpg"/>
				<span style="margin-left: 10px;"></span>
			</small>
			<div style="padding-left: 0px;overflow: hidden;border:1px solid #cfcfcf;">
				<input type="text" placeholder="手机/邮箱" id="loginAccont" name="username" style="border: none;"/> 
			</div>  
			<div style="padding-left: 0px;overflow: hidden;border:1px solid #cfcfcf;">
			<input type="password" placeholder="密码" id="password" name="password" style="border: none;"/> 
			</div> 
			<em style="padding-left: 0px;">
			<span class="checkSwitch" style="display: inline-block; width: 15px; height: 15px;">
				<img src="/res/images/checkBoxRadio/noCheck.jpg" onclick="read(this)" style="display:none;vertical-align: auto;" data-id="rememberMe" data-value="false"/>
				<img src="/res/images/checkBoxRadio/a_18.jpg" onclick="read(this)" data-id="rememberMe" data-value="true" style="vertical-align: auto;"/>
			</span>
                <input type="hidden" name="rememberMe" id="rememberMe" value="true"/>
                下次自动登录
				<a href="/user/iforgot" style="color:#00ceff;float: right;">忘记密码？</a>
			</em>
			<button type="button" onclick="login()">登录</button>
			<b style="font-weight: normal;">还没有账号？<a href="javascript:void(0);" style="color:#00b1db;" onclick="switchToR(this, '18951630791')">立即注册</a></b>
		</div>
		<div class="hid">
			<small style="visibility: hidden;" id="loginError">
				<img src="/res/images/oparaStatus/noticeCl_11.jpg"/>
				<span style="margin-left: 10px;"></span>
			</small>
			<div style="padding-left: 0px;overflow: hidden;border:1px solid #cfcfcf;">
				<input type="text" placeholder="手机/邮箱" id="loginAccont" name="username" style="border: none;"/> 
			</div>  
			<div style="padding-left: 0px;overflow: hidden;border:1px solid #cfcfcf;">
			<input type="password" placeholder="密码" id="password" name="password" style="border: none;"/> 
			</div> 
			<em style="padding-left: 0px;">
			<span class="checkSwitch" style="display: inline-block; width: 15px; height: 15px;">
				<img src="/res/images/checkBoxRadio/noCheck.jpg" onclick="read(this)" style="display:none;vertical-align: auto;" data-id="rememberMe" data-value="false"/>
				<img src="/res/images/checkBoxRadio/a_18.jpg" onclick="read(this)" data-id="rememberMe" data-value="true" style="vertical-align: auto;"/>
			</span>
                <input type="hidden" name="rememberMe" id="rememberMe" value="true"/>
                下次自动登录
				<a href="/user/iforgot" style="color:#00ceff;float: right;">忘记密码？</a>
			</em>
			<button type="button" onclick="login()">登录</button>
			<b style="font-weight: normal;">还没有账号？<a href="javascript:void(0);" style="color:#00b1db;" onclick="switchToR(this, '18951630791')">立即注册</a></b>
		</div>
		</div>
	  </div>  
  <div class="foot">
	<div class="footCot">
		<a href="javascript:void(0);">服务条款&nbsp;&nbsp;|&nbsp;&nbsp;</a>
		<a href="javascript:void(0);">关于我们&nbsp;&nbsp;|&nbsp;&nbsp;</a>
		<a href="javascript:void(0);">联系我们&nbsp;&nbsp;|&nbsp;&nbsp;</a>
		<a href="javascript:void(0);">帮助中心&nbsp;&nbsp;|&nbsp;&nbsp;</a>
		<a href="javascript:void(0);">加入我们</a>  
	</div>
	<h6 class="footCot" style="height:30px;line-height:30px;color:#999999;">
		 沪ICP备15024004号-1 © 2015-2016 azt365.com 版权所有
	</h6>
  </div>
  <script type="text/javascript" src="/res/js/common/jquery.1.9.1.min.js"></script>
  <script type="text/javascript" src="/res/js/common/js.cookie.js"></script>
  <script type="text/javascript" src="/res/js/common/util.js"></script>
  <script type="text/javascript" src="/res/third/layer/layer.js"></script>
  <script type="text/javascript">
  	$(function(){
  		$(".inputDiv.loginForm h6 a").click(function(){
  			var dt=$(this).attr("data-type");//0:供应；1：管理员
  			$(this).siblings("a").removeClass("present");
  			$(this).addClass("present");
  			$(".inputDiv.loginForm>div:eq("+dt+")").siblings("div").animate({left:"-900px"},500);
  			$(".inputDiv.loginForm>div:eq("+dt+")").animate({left:0},500); 
  		});
  	});
		  function randomPicCode() {
		      $('#picCode img').prop('src', '/authImage?n=regCode&r=' + Math.random());
		  }
		
		  function login() {
			  var username = $.trim($('#loginAccont').val());
			  var password = $('#password').val();
		      var rememberMe = $('#rememberMe').val();
		
			  if($.trim(username) == '') {
				  showLoginError('请输入手机号或邮箱');
				  return;
			  }
			  if($.trim(password) == '') {
				  showLoginError('请输入密码');
				  return;
			  }
			  if(!isMobile(username) && !isEmail(username)) {
				  showLoginError("请输入手机号或邮箱");
				  return;
			  }
		
		      $.ajax({
		          url : '/user/login',
		          type : 'post',
		          dataType : "json",
		          data : {username : username, password : password, rememberMe : rememberMe},
		          beforeSend : function() {
		              layer.load(2, {shade: 0.1});
		          },
		          success : function(data) {
		              if(data.success) {
		              		alert(1);
		              } else {
		                  if(data.obj) {
		                      window.location.href = data.obj;
		                  } else {
		                      showLoginError(data.msg);
		                  }
		              }
		          },
		          error : function() {
		              showLoginError("登录失败");
		          },
		          complete : function() {
		              layer.closeAll();
		          }
		      });
		  }
		
		  /**
		   * 检测账户名是否可以注册
		   * */
		  function checkUserNameForRegister(async) {
		      var username = $('.regForm input[name=username]').val();
		      if(isMobile(username)) {
		          $('#smsCode').show();
		          $('#picCode').hide();
		      } else {
		          $('#smsCode').hide();
		          $('#picCode').show();
		      }
			  if($.trim(username) == '') {
				  showRegisterError('请输入手机号或邮箱');
				  return false;
			  }
			  if(!isMobile(username) && !isEmail(username)) {
				  showRegisterError('手机/邮箱格式不正确，请重新输入');
				  return false;
			  }
			  var flag = false;
		      $.ajax({
		          url : '/user/checkUserNameForRegister',
		          type : 'post',
		          dataType : "json",
		          async : async,
		          data : {username : username},
		          beforeSend : function() {
		              layer.load(2, {shade: 0.1});
		          },
		          success : function(data) {
		              if(data.success) {
						  clearRegisterError();
						  flag = true;
		              } else {
						  showRegisterError(data.msg);
		              }
		          },
		          complete : function() {
		              layer.closeAll();
		          }
		      });
			  return flag;
		  }
		
		  function register() {
		      var username = $('.regForm input[name=username]').val();
			  var password = $('.regForm input[name=password]').val();
		      var code = $('.regForm input[name=code]').val();
		      var hasRead = $('.regForm input[name=hasRead]').val();
			  if(!checkUserNameForRegister(false)) {
				  return;
			  }
			  if(password == '') {
				  showRegisterError('请输入密码');
				  return;
			  }
			  if(password.indexOf(' ') >= 0) {
				  showRegisterError('密码不能包含‘空格’，请重新输入');
				  return;
			  }
			  if(password.length < 6 || password.length > 20) {
		          showRegisterError('密码为6-20个字符，可由英文、数字及符号组成');
		          return;
			  }
			  if($.trim(code) == '') {
				  showRegisterError('请输入验证码');
				  return;
			  }
		      if(hasRead != 'true') {
		          showRegisterError('需同意协议');
		          return;
		      }
		      $.ajax({
		          url : '/user/register',
		          type : 'post',
		          dataType : "json",
		          data : {username : username, password : password, code : code, hasRead : hasRead},
		          beforeSend : function() {
		              layer.load(2, {shade: 0.1});
		          },
		          success : function(data) {
		              if(data.success) {
		                  if(data.obj) {
		                      //跳转激活页面
		                      window.location = data.obj;
		                  } else {
		                      window.location.replace('/user/regSuccess');
		                  }
		              } else {
		                  showRegisterError(data.msg);
		              }
		          },
		          error : function() {
		              showRegisterError('注册失败');
		          },
		          complete : function() {
		              layer.closeAll();
		          }
		      });
		  }
		
		function allClear() {
		      $('#loginAccont').val('');
		      $('#password').val('');
		
		      $('.regForm input[name=username]').val('');
		      $('.regForm input[name=password]').val('');
		      $('.regForm input[name=code]').val('');
		
		      clearLoginError();
		      clearRegisterError();
		  }
		
		  /**
		   * 显示登录错误提示
		   * */
		  function showLoginError(msg) {
			  $('#loginError span').html(msg); 
		      $('#loginError').css("visibility","visible");
		  }
		
		  /**
		   * 清除登录错误提示
		   * */
		  function clearLoginError() {
		      $('#loginError span').html('');
		      $(".telLogin").css('top', '');
		      $(".passReg").css('top', '');
		      $('#loginError').css("visibility","hidden");
		  }
		
		  function showRegisterError(msg) {
		      $('#registerError span').html(msg);
		      $('#registerError').css("visibility","visible");
		  }
		
		  function clearRegisterError() {
		      $('#registerError span').html('');
		      $('.tel').css("top", '');
		      $('.pass').css("top", '');
		      $(".vali").css("top","");
		      $('#registerError').css("visibility","hidden");
		  }
		
		  //登录/注册动画
		  function specity(o){
		      $(".inputDiv small").css("visibility","hidden");
		      $(o).parents(".inputDiv").animate({"left":"-350px"},"slow");
		      $(o).parents(".inputDiv").siblings(".inputDiv").animate({"left":"25px"},"slow"); 
		  }
		  /*切换登录/注册*/
		  function switchToR(o){
		      specity(o);
		      //document.getElementById("regsAccont").focus();
		      $(".top big").html("注册");
		      allClear();
		      isLogin = false;
		  }
		  function switchToL(o) {
		      specity(o);
		      //document.getElementById("loginAccont").focus();
		      $(".top big").html("欢迎登录");
		      allClear();
		      isLogin = true;
		  }
		
		  //跳转到登录框中，并自动填写帐号
		  function toLogin(username) {
		      $('.regForm a:last').click();
		      $('#loginAccont').val(username);
		  }
		
		  function read(o) {
		      $(o).siblings("img").show();
		      $(o).hide();
		      var id = $(o).siblings("img").attr('data-id');
		      var value = $(o).siblings("img").attr('data-value');
		      $('#' + id).val(value);
		  }
		
		  /**
		   * 显示发送倒计时
		   * */
		  function showSending(countdown) {
			  $('#sended').hide();
			  $('#sending').show();
			  $('#sending').html(countdown + "秒重新发送");
		  }
		
		  /**
		   * 显示重新发送按钮
		   * */
		  function showSended() {
		      $('#sended').show();
		      $('#sending').hide();
		  }
  </script>
  </body>
</html>